import { IAsyncRouteState } from './state'
import { RouteRecordRaw } from 'vue-router'
import Storage from '@/utils/storage'
import { CURRENT_ACTIVITY_INFO } from '@/store/mutation-types'



export const getters = {
  menus(state: IAsyncRouteState): RouteRecordRaw[] {
    return state.menus
  },
  curActive(state: IAsyncRouteState) {
    return Storage.get(CURRENT_ACTIVITY_INFO) ? Storage.get(CURRENT_ACTIVITY_INFO) : state?.curActive
  },
}
